package com.example.sync.service;

import com.example.sync.pojo.User;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author gaofeng
 * @date 2022年07月03日 8:34
 */
@Service
public class AsyncService {

    @Async
    public void sendMail() {
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        System.out.println("数据正在处理中...");
    }
}
